#include <bits/stdc++.h>
using namespace std;

bool is_Prime(const unsigned long long n) {
    if (n <= 1)
        return false;
    for (long long i = 2; i <= sqrt(n); i++)
        if (n % i == 0)
            return false;
    return true;
}

void get_Primes(const unsigned long long end_num) {
    int n = 0;
    for (long long i = 2; i <= end_num; i++)
        if (is_Prime(i)) {
            if (n++ >= 5) {
                n = 1;
                cout << endl;
            }
            cout << i << ' ';
        }
}

int main(){
    get_Primes(100);
    return 0;
}